package com.yxinsur.imc.business.mapper;

import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yxinsur.imc.business.domain.ImcBrokerPersistencyRate;
import com.yxinsur.imc.business.form.BrokerPersistencyRateCalculateForm;
import com.yxinsur.imc.business.form.BrokerPersistencyRateForm;
import com.yxinsur.imc.business.vo.BrokerPersistencyRateVo;
import org.apache.ibatis.annotations.Param;

/**
 * 代理人继续率Mapper接口
 *
 * @author imc
 * @date 2021-05-20
 */
public interface ImcBrokerPersistencyRateMapper extends BaseMapper<ImcBrokerPersistencyRate>
{

    /**
     * 查询代理人继续率列表
     * @param brokerPersistencyRateForm 代理人继续率
     * @return 代理人继续率
     */
    public List<BrokerPersistencyRateVo> selectImcBrokerPersistencyRateList(@Param("param") BrokerPersistencyRateForm brokerPersistencyRateForm, @Param("tenantId") Long tenantId);

    /**
     * 查询计算代理人继续率列表
     * @param month
     * @param policyYear
     * @param tenantId
     * @return
     */
    public List<Map<String,Object>> calculateBrokerPersistencyRateList(@Param("month") String month, @Param("policyYear") Integer policyYear, @Param("tenantId")Long tenantId);

    ImcBrokerPersistencyRate selectImcBrokerPersistencyRateByBrokerId(@Param("brokerId") Long brokerId, @Param("persistencyMonth") String persistencyMonth, @Param("persistencyRateType") String persistencyRateType);
}
